<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePointBagsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('point_bags', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('description');
            $table->string('image');
            $table->integer('sort_num')->default(0);
            $table->unsignedInteger('point')->default(0);

//            出成长咖啡范围
            $table->text('growing_coffee');
//            几率出免费咖啡券
            $table->text('free_coupon');
//            折扣范围
            $table->text('discount_coupon');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('point_bags');
    }
}
